package com.demo.aidlproject.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class ConnectInfo implements Parcelable {

    String state;
    String code;
    public ConnectInfo(){}

    protected ConnectInfo(Parcel in) {
        state = in.readString();
        code = in.readString();
    }

    public static final Creator<ConnectInfo> CREATOR = new Creator<ConnectInfo>() {
        @Override
        public ConnectInfo createFromParcel(Parcel in) {
            return new ConnectInfo(in);
        }

        @Override
        public ConnectInfo[] newArray(int size) {
            return new ConnectInfo[size];
        }
    };

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(state);
        parcel.writeString(code);
    }

    @Override
    public String toString() {
        return "ConnectInfo{" +
                "state='" + state + '\'' +
                ", code='" + code + '\'' +
                '}';
    }
}
